package com.pai4j.remote.pgc.community;

import com.pai4j.common.bean.PAIPageResponseBeanUtil;
import com.pai4j.common.bean.PAIResponseBean;
import com.pai4j.domain.community.vo.request.CCAnswerSaveRequestVO;
import com.pai4j.domain.community.vo.response.cc.CTCAnswerListVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * community Answer (回答) Feign Client
 * 提供社区回答相关的远程调用接口
 *
 * @author: CYM-pai
 * @date: 2025/10/28
 **/
@FeignClient(name = "pai4j-pgc-service", contextId = "ccAnswerClient")
public interface CCAnswerClient {

    /**
     * 保存/编辑回答
     */
    @PostMapping("/pgc-service/api/cc/answer/save")
    PAIResponseBean<Long> save(@RequestBody CCAnswerSaveRequestVO answerSaveRequestVO);

    /**
     * 分页查询问题的最新回复列表
     */
    @GetMapping("/pgc-service/api/cc/answer/new/list/{questionId}/{pageNo}/{pageSize}")
    PAIPageResponseBeanUtil<CTCAnswerListVO> newPageList(
            @PathVariable("questionId") Long questionId,
            @PathVariable("pageNo") Integer pageNo,
            @PathVariable("pageSize") Integer pageSize);
}

